package com.atgm.mall.gmmallcart.feign;

import com.atgm.common.utils.R;
import com.atgm.mall.gmmallcart.feign.fallback.MemberFeignFallbackService;
import com.atgm.mall.gmmallcart.vo.req.MemberWishReqVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "gm-mall-member", qualifier = "memberFeignService", fallback = MemberFeignFallbackService.class)
public interface MemberFeignService {

    @GetMapping("/gmmallmember/memberwish/isWished/{gameId}/{memberId}")
    R isWished(@PathVariable("gameId") Long gameId, @PathVariable("memberId") Long memberId);

    /**
     * 添加心愿单
     * @param entity
     * @return
     */
    @PostMapping("/gmmallmember/memberwish/addWish")
    R addMemberWish(@RequestBody MemberWishReqVo entity);

}
